#ifndef RX_H
#define RX_H
#include "globalParameters.h"

class Rx{
public:
	Rx(int id, int xPos,int yPos, GlobalParameters parameters);

	int getID();
	double getSignal();
	void setSignal(double);
	double getInterference();
	void setInterference(double);
	double getNoise();
	void setNoise(double);
	void print();
	void setTransmitter(int);
	int getTransmitter();
	int getX();
	int getY();
	int getId();
	void incrementInterference(double);
	bool canReceive(GlobalParameters);
	bool successOnLast();
	void setLastPacket(bool);
	int getSlotsToGo();
	void setSlotsToGo(int);
	void decrementSlotsToGo();

private:
	int rxID;//unique id of the node
	int xPos;//x-coordinate
	int yPos;//y-coordinate
	int transmitter;
	double signal;//transmission power (signal) received at receiver in Watts
	double interference;//sum ofinterference rceived at the receiver in Watts
	double noise;//noise level at the receiver in Watts
	bool lastPacket;
	int slotsToGo;
};

#endif
